<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="SyntaxHighlighter.css" rel="stylesheet" type="text/css" />
<style type="text/css"><!--
p.MsoNormal {margin:0cm;
margin-bottom:.0001pt;
text-autospace:none;
font-size:10.0pt;
font-family:Arial;}
.style1 {color: #FF0000}
-->
</style>
<style type="text/css">
<!--
table.MsoNormalTable {
font-size:10.0pt;
font-family:"Times New Roman";
}
-->
</style>
</head>

<body>
<p class="MsoNormal" style="background:white;"><span class="MsoNormal" style="background:white;"><img src="saibamais.jpg" width="270" height="50" alt="Saiba Mais" /></span></p>
<p class="MsoNormal" style="background:white;"></p>
<p class="MsoNormal" style="background:white;"><strong><span style="font-size:12.0pt; ">Ponto de verifica</span></strong><strong><span style="font-size:12.0pt; ">&ccedil;&atilde;</span></strong><strong><span style="font-size:12.0pt; ">o 9.3</span></strong></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:24.95pt;margin-bottom:.0001pt;margin-left:28.3pt;line-height:12.0pt;background:white;"><span style="font-size:12.0pt; ">Em programas interpret</span><span style="font-size:12.0pt; ">&aacute;</span><span style="font-size:12.0pt; ">veis, especificar respostas a eventos, preferindo-as a  rotinas dependentes de dispositivos (mouse).</span></p>
<ol>
  <li><span style="font-size:12.0pt; ">Use </span><span style="font-size:12.0pt; ">&ldquo;</span><span style="font-size:12.0pt; ">onmousedown</span><span style="font-size:12.0pt; ">&rdquo;</span><span style="font-size:12.0pt; "> com </span><span style="font-size:12.0pt; ">&ldquo;</span><span style="font-size:12.0pt; ">onkeydown</span><span style="font-size:12.0pt; ">&rdquo;</span><span style="font-size:12.0pt; ">.</span><span style="font-size:12.0pt; "> </span></li>
  <li><span style="font-size:12.0pt; ">Use </span><span style="font-size:12.0pt; ">&ldquo;</span><span style="font-size:12.0pt; ">onmouseup</span><span style="font-size:12.0pt; ">&rdquo;</span><span style="font-size:12.0pt; "> com </span><span style="font-size:12.0pt; ">&ldquo;</span><span style="font-size:12.0pt; ">onkeyup</span><span style="font-size:12.0pt; ">&rdquo;</span></li>
  <li><span style="font-size:12.0pt; ">Use </span><span style="font-size:12.0pt; ">&ldquo;</span><span style="font-size:12.0pt; ">onclick</span><span style="font-size:12.0pt; ">&rdquo;</span><span style="font-size:12.0pt; "> com </span><span style="font-size:12.0pt; ">&ldquo;</span><span style="font-size:12.0pt; ">onkeypress</span><span style="font-size:12.0pt; ">&rdquo;</span></li>
  <li><span style="letter-spacing:-.05pt; font-size:12.0pt; ">Note que n</span><span style="font-size:12.0pt; ">&atilde;</span><span style="font-size:12.0pt; ">o existe  equivalente de teclado para duplo-click (</span><span style="font-size:12.0pt; ">&ldquo;</span><span style="font-size:12.0pt; ">ondblclick</span><span style="font-size:12.0pt; ">&rdquo;</span><span style="font-size:12.0pt; ">) em HTML  4.0.</span><span style="font-size:12.0pt; "> </span></li>
</ol>
<p class="MsoNormal" style="margin-top:27.35pt;background:white;"><strong><span style="font-size:12.0pt; ">Exemplo 1</span></strong></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white;"><span style="letter-spacing:-.1pt; font-size:12.0pt; ">Use um  manipulador de evento independente do dispositivo que trabalhe com qualquer a</span><span style="font-size:12.0pt; ">&ccedil;&atilde;</span><span style="font-size:12.0pt; ">o </span><span style="font-size:12.0pt; ">de entrada apropriada: neste  caso, ONFOCUS trabalha com o teclado e com o mouse, e </span><span style="font-size:12.0pt; ">&eacute; </span><span style="font-size:12.0pt; ">por isso considerado um  manipulador de eventos independente do dispositivo.</span></p>
<p class="MsoNormal" style="margin-top:9.85pt;margin-right:44.65pt;margin-bottom:.0001pt;margin-left:0cm;text-align:justify;line-height:12.0pt;background:white;"><span style="font-size:12.0pt; ">O exemplo </span><span style="font-size:12.0pt; ">&eacute;</span><span style="font-size:12.0pt; "> o </span><span style="font-size:12.0pt; ">&ldquo;</span><span style="font-size:12.0pt; ">bot</span><span style="font-size:12.0pt; ">&atilde;</span><span style="font-size:12.0pt; ">o ativado  com o script</span><span style="font-size:12.0pt; ">&rdquo;</span><span style="font-size:12.0pt; ">: experimente clicar em cima dele ou usar </span><span style="font-size:12.0pt; ">TAB. Uma pequena caixa de alerta  surgir</span><span style="font-size:12.0pt; ">&aacute;</span><span style="font-size:12.0pt; "> contendo uma mensagem sobre o pr</span><span style="font-size:12.0pt; ">&ecirc;</span><span style="font-size:12.0pt; ">mio. </span><span style="font-size:12.0pt; ">Pressionando a tecla </span><span style="font-size:12.0pt; ">&ldquo;</span><span style="font-size:12.0pt; ">Escape</span><span style="font-size:12.0pt; ">&rdquo;</span><span style="font-size:12.0pt; "> far</span><span style="font-size:12.0pt; ">&aacute;</span><span style="font-size:12.0pt; "> com que a  mesma desapare</span><span style="font-size:12.0pt; ">&ccedil;</span><span style="font-size:12.0pt; ">a.</span></p>
<p class="MsoNormal" style="margin-top:1.9pt;margin-right:0cm;margin-bottom:.0001pt;margin-left:.25pt;line-height:21.85pt;background:white;"><strong><span style="letter-spacing:-.25pt; font-family:'Courier New'; ">&lt;button onfocus=</span></strong><strong><span style="font-family:'Courier New'; ">&rdquo;</span></strong><strong><span style="font-family:'Courier New'; ">pop1()</span></strong><strong><span style="font-family:'Courier New'; ">&rdquo;</span></strong><strong><span style="font-family:'Courier New'; ">&gt; Cadastre-se! &lt;/button&gt;</span></strong></p>
<p class="MsoNormal" style="line-height:21.85pt;background:white;"><span style="font-size:12.0pt; ">E aqui  est</span><span style="font-size:12.0pt; ">&aacute;</span><span style="font-size:12.0pt; "> o script que faz o trabalho:</span></p>
<p class="MsoNormal" style="margin-left:.25pt;line-height:21.85pt;background:white;"><strong><span style="font-family:'Courier New'; ">&lt;script type=</span></strong><strong><span style="font-family:'Courier New'; ">&rdquo;</span></strong><strong><span style="font-family:'Courier New'; ">text/javascript</span></strong><strong><span style="font-family:'Courier New'; ">&rdquo;</span></strong><strong><span style="font-family:'Courier New'; ">&gt;</span></strong> </p>
<p class="MsoNormal" style="margin-left:.25pt;line-height:9.85pt;background:white;"><strong><span style="font-family:'Courier New'; ">function pop1() { alert (</span></strong><strong><span style="font-family:'Courier New'; ">&ldquo;</span></strong><strong><span style="font-family:'Courier New'; ">Concorra </span></strong><strong><span style="font-family:'Courier New'; ">&agrave;</span></strong><strong><span style="font-family:'Courier New'; "> 10 pr</span></strong><strong><span style="font-family:'Courier New'; ">&ecirc;</span></strong><strong><span style="font-family:'Courier New'; ">mios!</span></strong><strong><span style="font-family:'Courier New'; ">&rdquo;</span></strong><strong><span style="font-family:'Courier New'; ">) }</span></strong></p>
<p class="MsoNormal" style="margin-left:.25pt;line-height:9.85pt;background:white;"><strong><span style="font-family:'Courier New'; ">&lt;/script&gt;</span></strong></p>
<p class="MsoNormal" style="margin-left:.25pt;line-height:9.85pt;background:white;"><strong><span style="font-family:'Courier New'; ">&lt;noscript&gt;Concorra </span></strong><strong><span style="font-family:'Courier New'; ">a</span></strong><strong><span style="font-family:'Courier New'; "> 10 pr</span></strong><strong><span style="font-family:'Courier New'; ">&ecirc;</span></strong><strong><span style="font-family:'Courier New'; ">mios!&lt;/noscript&gt;</span></strong></p>
<strong><span style="font-family:Arial; font-size:12.0pt; "><br clear="all" style="page-break-before:always;" />
</span></strong>
<p class="MsoNormal" style="margin-left:1.45pt;background:white;"><strong><span style="font-size:12.0pt; ">&nbsp;</span></strong></p>
<p class="MsoNormal" style="margin-left:1.45pt;background:white;">&nbsp;</p>
<p class="MsoNormal" style="margin-left:1.45pt;background:white;"><strong><span style="font-size:12.0pt; ">Exemplo 2</span></strong></p>
<p class="MsoNormal" style="margin-top:6.0pt;line-height:12.0pt;background:white;"><span style="font-size:12.0pt; ">Use  mais do que um manipulador de evento dependente de dispositivo para </span><span style="font-size:12.0pt; ">&ldquo;</span><span style="font-size:12.0pt; ">cobrir  todas </span><span style="letter-spacing:-.15pt; font-size:12.0pt; ">as bases</span><span style="font-size:12.0pt; ">&rdquo;</span><span style="font-size:12.0pt; ">: ONCLICK  requer um mouse, enquanto que ONKEYPRESS requer um teclado. </span><span style="font-size:12.0pt; ">Ambos s</span><span style="font-size:12.0pt; ">&atilde;</span><span style="font-size:12.0pt; ">o  dependentes de dispositivos, mas a sua inclus</span><span style="font-size:12.0pt; ">&atilde;</span><span style="font-size:12.0pt; ">o vai permitir a qualquer um </span><span style="font-size:12.0pt; ">benefciar-se da t</span><span style="font-size:12.0pt; ">&eacute;</span><span style="font-size:12.0pt; ">cnica.</span></p>
<p class="MsoNormal" style="margin-top:9.85pt;line-height:12.0pt;background:white;"><span style="font-size:12.0pt; ">Outro </span><span style="font-size:12.0pt; ">&ldquo;</span><span style="font-size:12.0pt; ">bot</span><span style="font-size:12.0pt; ">&atilde;</span><span style="font-size:12.0pt; ">o ativado por script</span><span style="font-size:12.0pt; ">&rdquo;</span><span style="font-size:12.0pt; ">: clique sobre ele, ou use TAB at</span><span style="font-size:12.0pt; ">&eacute;</span><span style="font-size:12.0pt; "> ele e  pressione qualquer </span><span style="font-size:12.0pt; ">tecla  para ativar o script. Surgir</span><span style="font-size:12.0pt; ">&aacute;</span><span style="font-size:12.0pt; "> uma pequena caixa de alerta contendo uma mensagem </span><span style="font-size:12.0pt; ">sobre o pr</span><span style="font-size:12.0pt; ">&ecirc;</span><span style="font-size:12.0pt; ">mio.  Pressione a tecla Escape para a janela desaparecer.</span></p>
<p class="MsoNormal" style="margin-top:11.3pt;margin-right:0cm;margin-bottom:.0001pt;margin-left:.25pt;line-height:10.1pt;background:white;"><strong><span style="font-family:'Courier New'; ">Voc</span></strong><strong><span style="font-family:'Courier New'; ">&ecirc;</span></strong><strong><span style="font-family:'Courier New'; "> vai ganhar um pr&ecirc;mio se</span></strong></p>
<p class="MsoNormal" style="margin-left:.25pt;line-height:10.1pt;background:white;"><strong><span style="font-family:'Courier New'; ">&lt;button onclick=</span></strong><strong><span style="font-family:'Courier New'; ">&rdquo;</span></strong><strong><span style="font-family:'Courier New'; ">pop2()</span></strong><strong><span style="font-family:'Courier New'; ">&rdquo;</span></strong><strong><span style="font-family:'Courier New'; "> onkeypress=</span></strong><strong><span style="font-family:'Courier New'; ">&rdquo;</span></strong><strong><span style="font-family:'Courier New'; ">pop2()</span></strong><strong><span style="font-family:'Courier New'; ">&rdquo; </span></strong><strong><span style="font-family:'Courier New'; ">&gt;</span></strong> </p>
<p class="MsoNormal" style="margin-left:.25pt;line-height:10.1pt;background:white;"><strong><span style="font-family:'Courier New'; ">clicar aqui!&lt;/button&gt;.</span></strong></p>
<p class="MsoNormal" style="margin-top:7.9pt;background:white;"><span style="font-size:12.0pt; ">E aqui est</span><span style="font-size:12.0pt; ">&aacute;</span><span style="font-size:12.0pt; "> o c</span><span style="font-size:12.0pt; ">&oacute;</span><span style="font-size:12.0pt; ">digo da fun</span><span style="font-size:12.0pt; ">&ccedil;&atilde;</span><span style="font-size:12.0pt; ">o  script:</span></p>
<p class="MsoNormal" style="margin-top:11.05pt;margin-right:0cm;margin-bottom:.0001pt;margin-left:.25pt;line-height:9.85pt;background:white;"><strong><span style="font-family:'Courier New'; ">&lt;script type=</span></strong><strong><span style="font-family:'Courier New'; ">&rdquo;</span></strong><strong><span style="font-family:'Courier New'; ">text/javascript</span></strong><strong><span style="font-family:'Courier New'; ">&rdquo;</span></strong><strong><span style="font-family:'Courier New'; ">&gt;</span></strong> </p>
<p class="MsoNormal" style="margin-left:.25pt;line-height:9.85pt;background:white;"><strong><span style="font-family:'Courier New'; ">function pop2() { window.open  (cadastro.htm) }</span></strong> </p>
<p class="MsoNormal" style="margin-left:.25pt;line-height:9.85pt;background:white;"><strong><span style="font-family:'Courier New'; ">&lt;/script&gt;</span></strong></p>
<p class="MsoNormal" style="margin-left:.25pt;line-height:9.85pt;background:white;"><strong><span style="font-family:'Courier New'; ">&lt;noscript&gt;&lt;p&gt;Cadastre-se agora! <u><a href="http://www.site.org.br/cadastro.htm"><span style="color:windowtext; ">www.site.org.br/cadastro.htm</span></a></u>&lt;/p&gt;&lt;/noscript&gt;</span></strong></p>
</body>
</html>
